package com.tan.entity;

import java.util.Date;
/**
 * @Author 谭永超 [www.tanyongchao.tk:8090/SumDome/index]
 * @Date 2018/8/16 18:06
 * @Description 航班信息实体类
*/
public class InfoEntity implements Comparable<InfoEntity> {
    private String departure;//始发站信息
    private String departureAirportCode;//机场代码
    private String departureAirportName;//机场名
    private Date departureDate;//起飞日期
    private Date departureTime;//起飞时刻
    private String departureTerminal;//航站楼
    private String arrival;//到达站信息
    private String arrivalAirportCode;//机场代码
    private String arrivalAirportName;//机场名
    private Date arrivalDate;//到达日期
    private Date arrivalTime;//起飞时刻
    private String arrivalTerminal;//航站楼
    private String Carrier;//承运方（飞机）信息
    private String airlineCode;//航空公司代码
    private int flightNumber;//航班号
    private String electronicTicketing;//电子客票标识
    private String classes;
    private String status;// 状态

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDeparture() {
        return departure;
    }

    public void setDeparture(String departure) {
        this.departure = departure;
    }

    public String getDepartureAirportCode() {
        return departureAirportCode;
    }

    public void setDepartureAirportCode(String departureAirportCode) {
        this.departureAirportCode = departureAirportCode;
    }

    public String getDepartureAirportName() {
        return departureAirportName;
    }

    public void setDepartureAirportName(String departureAirportName) {
        this.departureAirportName = departureAirportName;
    }

    public String getDepartureTerminal() {
        return departureTerminal;
    }

    public void setDepartureTerminal(String departureTerminal) {
        this.departureTerminal = departureTerminal;
    }

    public Date getDepartureDate() {
        return departureDate;
    }

    public void setDepartureDate(Date departureDate) {
        this.departureDate = departureDate;
    }

    public Date getDepartureTime() {
        return departureTime;
    }

    public void setDepartureTime(Date departureTime) {
        this.departureTime = departureTime;
    }

    public String getArrival() {
        return arrival;
    }

    public void setArrival(String arrival) {
        this.arrival = arrival;
    }

    public String getArrivalAirportCode() {
        return arrivalAirportCode;
    }

    public void setArrivalAirportCode(String arrivalAirportCode) {
        this.arrivalAirportCode = arrivalAirportCode;
    }

    public String getArrivalAirportName() {
        return arrivalAirportName;
    }

    public void setArrivalAirportName(String arrivalAirportName) {
        this.arrivalAirportName = arrivalAirportName;
    }

    public Date getArrivalDate() {
        return arrivalDate;
    }

    public void setArrivalDate(Date arrivalDate) {
        this.arrivalDate = arrivalDate;
    }

    public Date getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(Date arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public String getArrivalTerminal() {
        return arrivalTerminal;
    }

    public void setArrivalTerminal(String arrivalTerminal) {
        this.arrivalTerminal = arrivalTerminal;
    }

    public String getCarrier() {
        return Carrier;
    }

    public void setCarrier(String carrier) {
        Carrier = carrier;
    }

    public String getAirlineCode() {
        return airlineCode;
    }

    public void setAirlineCode(String airlineCode) {
        this.airlineCode = airlineCode;
    }

    public int getFlightNumber() {
        return flightNumber;
    }

    public void setFlightNumber(int flightNumber) {
        this.flightNumber = flightNumber;
    }

    public String getElectronicTicketing() {
        return electronicTicketing;
    }

    public void setElectronicTicketing(String electronicTicketing) {
        this.electronicTicketing = electronicTicketing;
    }

    public String getClasses() {
        return classes;
    }

    public void setClasses(String classes) {
        this.classes = classes;
    }

    /**
     * @Author 谭永超 [www.tanyongchao.tk:8090/SumDome/index]
     * @Date 2018/8/16 22:42
     * @Description 比较方式
    */
    @Override
    public int compareTo(InfoEntity o) {
        int i;
        i = this.getDepartureDate().compareTo(o.getDepartureDate());
        if(i==0) {
            i = this.getDepartureTime().compareTo(o.getDepartureTime());//先按照时间排序
        }
        if(i==0){
            return this.getFlightNumber() - o.getFlightNumber();//如果年龄相等了再用分数进行排序
        }
        return i;
    }

}
